package tech.aistar.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import tech.aistar.entity.Car;
import tech.aistar.mapper.CarMapper;
import tech.aistar.service.ICarService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lpy
 * @since 2022-11-12
 */
@Service
public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarService {
    @Autowired(required = false)
    private CarMapper carMapper;
    @Override
    public Page<Car> getByPage(Integer pageNum) {
        Page<Car> page=new Page<>(pageNum,3);
        Page<Car> pageInfo=carMapper.selectPage(page,null);
        return pageInfo;
    }
}
